<template>
	<view>
		<view style="padding: 30rpx 0 100rpx 30rpx;background: #4066F4;">
			<view class="info">
				<view class="u-flex">
					<u-image :src="info.headimg" width="120" height="120" shape="circle"></u-image>
				     	<view class="u-margin-left-20">
						<view class="" v-if="info.nickname">
							<view style="color: #FFFFFF;font-size: 34rpx;">{{info.nickname}}</view>
						</view>
						<view v-else style="font-size: 34rpx;color: #fff;">
							<navigator url="../register/index" hover-class="none">
								点击登陆
							</navigator>
						</view>
					</view>
				</view>
			</view>



		</view>
		<view class="" style="background: #fff;border-radius: 60rpx 60rpx  0 0;position: relative;bottom: 50rpx;">
			
			<view class="u-flex u-row-around" style="padding: 40rpx 0;">
				<view v-for="(item,index) in classList" :key="index" index="item" @click="clickGrid(item.url)">
					<u-image :src="item.img" width="100" height="100"></u-image>
					<view class="grid-text">{{item.txt}}</view>
				</view>
			</view>
			
			<view class="mode">
				<u-cell-group :border="false">
					<!-- <u-cell-item title="渠道申请" @click="go('/else/MyApply/index')">
						<u-icon name="integral" size="36" slot="icon"  class="icon" ></u-icon>
					</u-cell-item> -->
					<u-cell-item title="我的收藏" @click="go('/else/MyCollect/index')">
						<image src="/static/icon_like.png" class="icon" slot="icon"></image>
					</u-cell-item>
					<!-- <u-cell-item title="我的优惠券" :border-bottom="false" @click="go('')">
						<image src="/static/my_vou.png" class="icon" slot="icon"></image>
					</u-cell-item> -->
				</u-cell-group>
			</view>
			
			<view class="mode">
				<u-cell-group :border="false">
					<u-cell-item title="设计订单" @click="go('/else/DesignBook/index')">
						<image src="/static/icon_yaoyue.png" class="icon" slot="icon"></image>
					</u-cell-item>
					<u-cell-item title="商品订单" @click="go('/pages/goodBook/index')">
						<image src="/static/icon_goodBook.png" class="icon" slot="icon"></image>
					</u-cell-item>
					<u-cell-item title="地址管理" :border-bottom="false" @click="go('/pages/address/index')">
						<image src="../../static/icon_map.png" class="icon" slot="icon"></image>
					</u-cell-item>
				</u-cell-group>
			</view>
			
			
			<view class="mode">
				<u-cell-group :border="false">
					<u-cell-item title="意见反馈" @click="go('/else/MyAdvise/index')">
						<image src="/static/icon_addvise.png" class="icon" slot="icon"></image>
					</u-cell-item>
					<u-cell-item title="常见问题" :border-bottom="false" @click="go('/pages/parse/index?id=20')">
						<image src="/static/icon_question.png" class="icon" slot="icon"></image>
					</u-cell-item>
					<u-cell-item title="在线客服" :border-bottom="false"  style="position: relative;">
						<button open-type="contact" class="custom-btn"></button>
						<image src="/static/icon_me_kefu.png" class="icon" slot="icon"></image>
					</u-cell-item>
					<u-cell-item title="关于我们" :border-bottom="false" @click="go('/pages/parse/index?id=21')">
						<image src="/static/icon_about.png" class="icon" slot="icon"></image>
					</u-cell-item>
				</u-cell-group>
			</view>
			
			

		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
                    headimg:'/static/logo.png'
				},
				classList: [{
					img: this.$ftpUrl('/myBacket.png'),
					txt: "我的钱包",
					url: "/else/wallet/index"
				}, {
					img: this.$ftpUrl('/myTeam.png'),
					txt: "我的团队",
					url: "/pages/myTeam/index"
				}, {
					img:this.$ftpUrl('/inviteFriendly.png'),
					txt: "邀请好友",
					url:  "/pages/invite/post"

				}, {
					img: this.$ftpUrl('/my_coupond_icon.png'),
					txt: "优惠券",
					url: "/else/MyVouch/index"
				}],
			}
		},
		onLoad() {
			
			
		},
		onShow() {
            this.$u.api.userInfo().then(res=>{
				this.info=res
			})
		},
		methods: {
			
			go(item){
				uni.navigateTo({
					url:item
				})
			},
			clickGrid(item){
				uni.navigateTo({
					url:item
				})
			}
		}
	}
</script>

<style>
   .mode{
	   padding: 0rpx 0!important;
	   box-shadow: 0px 2px 6px rgba(153, 153, 153, 0.2);
	   margin-bottom: 50rpx;
	   border-radius: 40rpx;
   }
   .icon{
	   width: 32rpx;
	   height: 32rpx;
	   margin-right: 10rpx;
   }
</style>
